using Order.Infrastructure.Extensions;
using Ordering.API;
using Ordering.Application;
using Ordering.Infrastructure;

var builder = WebApplication.CreateBuilder(args);
builder.Services
       .AddApplicationService()
       .AddInfrastructureService(builder.Configuration)
       .AddApiServices(builder.Configuration);




var app = builder.Build();

app.UseApiServices();

if (app.Environment.IsDevelopment())
{
    await app.InitializeDatabase();
}

//app.MapGet("/", () => "Hello World!");

app.Run();
